package cc.linker.steplink.crm.merchant.service.impl;

import cc.linker.steplink.crm.merchant.dao.wecom.WecomDao;
import cc.linker.steplink.crm.merchant.service.wecom.WecomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class WecomServiceImpl implements WecomService {
    @Autowired
    private WecomDao wecomDao;

    @Override
    public List<Map<String, Object>> customeList(Map<String, Object> map) {
        List<Map<String, Object>> list = wecomDao.customeList(map);
        //  List<Map<String,String>> resMap = ListByFirstUtil.toMap(list);
        return list;
    }

    @Override
    public Map<String, Object> customeInfo(Map<String, Object> map) {
        Map<String, Object> resMap = wecomDao.customeInfo(map);
        return resMap;
    }

    @Override
    public Object getTokenByOrgId(String orgId) {
        Map map = new HashMap();
        String token = wecomDao.getTokenByOrgId(orgId);
        map.put("tkoen", token);
        return map;
    }
}
